 /**  
 * Project Name:zhonghecrm  
 * File Name:SysDutyServiceImpl.java  
 * Package Name:com.crm.service.impl  
 * Date:2016年10月26日下午2:39:19   
 *  
*/  
  
package com.crm.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.crm.dao.SysDutyMapper;
import com.crm.model.SysDuty;
import com.crm.model.entity.Tree;
import com.crm.service.SysDutyService;
import com.crm.util.UUIDUtil;

/**  
 * ClassName:SysDutyServiceImpl <br/>  
 * Function: TODO ADD FUNCTION. <br/>  
 * Reason:   TODO ADD REASON. <br/>  
 * Date:     2016年10月26日 下午2:39:19 <br/>  
 * @author   hanlinxiu  
 * @version    
 * @since    JDK 1.8  
 * @see        
 */
@Service
public class SysDutyServiceImpl extends BaseServiceImpl<SysDuty> implements SysDutyService{
	
	@Autowired
	SysDutyMapper sysDutyMapper;
	
	@Override
	public int insert(SysDuty record) {
		
		String uuid = UUIDUtil.getUUID();
		record.setDutyId(uuid);
		
		return super.insert(record);
	}
	
	@Override
	public List<SysDuty> getByDepartmentId(String departmentId){
		return sysDutyMapper.selectByDepartmentId(departmentId);
	} 
	
	@Override
	public List<Tree> selectByParm(Tree tree) {
		return sysDutyMapper.selectByParm(tree);
	}
	
}
  
